#ifndef PATH_JC_H
#define PATH_JC_H

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "studio_geo_c.h"

// 数据初始化
#define MAX_POINTS 500
#define max_points 30
#define PI 3.14159265358979323846
extern double R_EN; 


// 交换函数
void swap(double *a, double *b);
// 角转弧
double deg2rad(double deg);
// 转笛卡尔
void deg2Des(studio_line_c *line, unsigned int size);
// 中值滤波
void median_filter_2d(studio_line_c *input, studio_line_c *output, unsigned int size, int window_size); 
// 残差滤波
void var_filter(studio_line_c *in_before, studio_line_c *in_after, unsigned int size, float threshold); 
// 累计误差
void cumdist(studio_line_c *line, float *s, unsigned int size);
// 样条插样
void spline_interpolation(float *s, studio_line_c *line, unsigned int size, studio_line_c *tmp, int set_outs);

#endif